<% if user_signed_in? %>
<div class='menu'>
<%= link_to 'Back to articles', articles_path %> | <%= link_to 'New article', new_article_path %> | <%= link_to 'Edit', edit_article_path(@article) %> | Delete
</div>
<% end %>

<div>

<div class='column meta'>
<% if @article.tag == nil %>
<p><img src='<%= asset_path 'placeholder-250.png' %>'></p>
<% else %>
<p><img src='<%= asset_path "tags/#{@article.tag}.png" %>'></p>
<% end %>
<p>
<i>by <%= @article.user.email %></i><br>
<%= @article.created_at.strftime('%d %B %Y %I:%M') %>
</p>
</div>

<div class='column article'>
<h2><%= @article.title %></h2>
<%= sanitize @article.summary_html %>
<%= sanitize @article.text_html %>
</div>

</div>
